package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"week3/api/internal/config"
	"week3/rpc/goodsclient"
)

type ServiceContext struct {
	Config config.Config
	Rpc    goodsclient.Goods
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		Rpc:    goodsclient.NewGoods(zrpc.MustNewClient(c.Rpc)),
	}
}
